﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sispe.Entities;

namespace Sispe.Repository.Mapping
{
    public class TAREO_BORRADORMap : EntityTypeConfiguration<TAREO_BORRADOR>
    {
        public TAREO_BORRADORMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.EnrollNumber)
                .IsRequired()
                .HasMaxLength(8);

            // Table & Column Mappings
            this.ToTable("TAREO_BORRADOR");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.EnrollNumber).HasColumnName("EnrollNumber");
            this.Property(t => t.VerifyMode).HasColumnName("VerifyMode");
            this.Property(t => t.InOutMode).HasColumnName("InOutMode");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.WorkCode).HasColumnName("WorkCode");
            this.Property(t => t.Reserved).HasColumnName("Reserved");
            this.Property(t => t.Existe).HasColumnName("Existe");
            this.Property(t => t.Contrato).HasColumnName("Contrato");
            this.Property(t => t.Estado).HasColumnName("Estado");
            this.Property(t => t.Tareo).HasColumnName("Tareo");
        }
    }
}
